%%% ---------------------------------------------------------------------------
%%% OTP application definition tuple for TXM
%%% See http://www.erlang.org/doc/design_principles/applications.html
%%% ---------------------------------------------------------------------------
{application, txm,
  [
   %% Application description
   {description, "Madcloud"},

   %% Application version number
   {vsn, "0.1.0.0"},

   %% Modules in this application
   {modules, [
     backup,                    % Backup utilities from shell for prog db
     cache_srv,                 % Cache server
     fieldset_srv,              % Fieldset server/sequencer
     graph,                     % Sequencing graph builder
     node_srv,                  % Node server (one at a time is txm_master)
     nr_set_dict,               % Name/ref set dicts
     nr_set,                    % Name/ref sets
     process_cache,             % Process cache callbacks for cache_srv
     prog_srv,                  % Prog db gen_server
     prog,                      % Mnesia prog db implementation
     search,                    % Generalized best-first search
     struct,                    % Conversions to structs for xml/json i/o
     trace,                     % Trace utilities from shell
     txm_log,                   % Info, warning and error gen_event callbacks
     txm,                       % Application and supervisor behaviours
     txm_util,                  % General utility functions
     view_db,                   % Mnesia-based distributed db of views
     view_fsm,                  % View gen_fsm used by clients
     view_sup,                  % Supervisor for view_fsm
     web_srv,                   % Web server callbacks for httpd admin UI
     web_util,                  % Web utility functions
     web_view,                  % Web server callbacks for httpd client views
     xj                         % XML and JSON output from structs
     ]},

   %% Registered (ie named) processes started by this application
   {registered, [
     node_srv,
     process_cache,
     prog_srv,
     view_db,
     view_sup
     ]},

   %% Dependencies of this application
   {applications, [
     kernel,
     stdlib,
     mnesia
     ]},

   %% Environment variables in the Erlang runtime.
   %% Override using application:set_env(txm, Var, Value).
   {env, [
     {log_level, 1},            % 0=debug+, 1=info+, 2=warnings+, 3=errors.
     {startup, local},          % local | list(node()).
     {web_timeout_secs, 120},   % web_srv, web_view callback timeouts.
     {options, [                % Optional services also started.
       {web_srv, 6502},         % Web admin server on port 6502.
       {web_view, 6800}         % Web client views on port 6800.
       ]}
     ]},

   %% Module holding application behaviour callbacks
   {mod, {txm, []}}]}.
